package it.uniroma3.dia.db;
/** 
* @author Daniele D'Andrea
* @author Antonio Gallo
*/
public class DBQueryConstant {

	//#######INSERT#########
	public static final String INSERT_MOVIE_ACTORS = "INSERT into movie_actors VALUES(?, ?, ?, ?)";
	public static final String INSERT_MOVIE_COUNTRIES = "INSERT into movie_countries VALUES(?, ?)";
	public static final String INSERT_MOVIE_DIRECTORS = "INSERT into movie_directors VALUES(?, ?, ?)";
	public static final String INSERT_MOVIE_GENRES = "INSERT into movie_genres VALUES(?, ?)";
	public static final String INSERT_MOVIE_LOCATIONS = "INSERT into movie_locations VALUES(?, ?, ?, ?, ?)";
	public static final String INSERT_MOVIE_TAGS = "INSERT into movie_tags VALUES(?, ?, ?)";
	public static final String INSERT_MOVIES = "INSERT into movies VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
	public static final String INSERT_TAGS = "INSERT into tags VALUES(?, ?)";
	public static final String INSERT_USER_RATEDMOVIES = "INSERT into user_ratedmovies VALUES(?, ?, ?, ?)";
	public static final String INSERT_USER_TAGGEDMOVIES = "INSERT into user_taggedmovies VALUES(?, ?, ?, ?)";

	//#######STORED PROCEDURE#########
	public static final String STORED_PROCEDURE_DEVIATIONPREDICTION = "{ call deviationPrediction(?, ?, ?, ?) }";
	public static final String STORED_PROCEDURE_USERBASEDPREDICTION = "{ call userBasedPrediction(?, ?, ?, ?, ?) }";
	public static final String STORED_PROCEDURE_ITEMBASEDPREDICTION = "{ call itemBasedPrediction(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) }";
	public static final String STORED_PROCEDURE_ITEMBASEDTIMEPREDICTION = "{ call itemBasedTimePrediction(?, ?, ?, ?, ?) }";
	public static final String STORED_PROCEDURE_MIXPREDICTION = "{ call mixPrediction(?, ?, ?, ?, ?, ?, ?, ?,?) }";
	
	
	public static final String STORED_PROCEDURE_USERBASEDGENREPREDICTION = "{ call userBasedGenrePrediction(?, ?, ?, ?, ?) }";
	
	public static final String SELECT_MINMAX_TS = "select min(timestamp), max(timestamp) from user_ratedmovies";
	public static final String SELECT_OVERALLAVERAGERATING = "select avg(rating) from user_ratedmovies";
	public static final String SELECT_REAL_USER_RATING = "select rating from user_ratedmovies where userID=? and movieID=?";
	public static final String RANDOM_USERS_MOVIE = "SELECT * FROM user_ratedmovies ORDER by RAND() LIMIT ?";

	//1 and ratedmovies.userID = 39320
}
